<?php
namespace Admin\Controller;
use Think\Controller;
class UserAuthController extends CommonController{
    public function index(){
        $this->list=M("user_auth")->select();
        $this->display();
    }
    public function edit(){
        $id=I("get.id");
        $this->info=M('user_auth')->where(array("auth_id"=>$id))->find();
        if (IS_POST){
            $data=I('post.');
            $data['manage_time']=time();
            if(M("user_auth")->save($data)){
                $this->success("更新成功","index",1);die;
            }else{
                $this->error("更新失败","",1);
            }
        }
    	$this->display();
    }
    public  function del(){
        $id=I("get.id");
        $data['ustate']=0;
          if( M('user_auth')->where(array("auth_id"=>$id))->save($data)){
                $this->success("删除成功","index",1);die;
            }else{
                $this->error("删除失败","",1);
            }
       

    }
}